#pragma once
#include "Scene.h"
#include "ScreenText.h"
#include <list>
using namespace std;
using namespace Pulpy;

class LeaderBoard
{ //Leader board system
private:
	LeaderBoard(void);
	int P1_Score;	//For in-game score checking
	int P2_Score;	//For in-game score checking

	list<pair<string, int>> ScoreList;


public:
	static LeaderBoard getInstance()
	{
		static LeaderBoard s_instance;
		return s_instance;
	}
	void SaveFile(void);

	void P1_AddScore(void) { ++P1_Score; };
	void P2_AddScore(void) { ++P2_Score; };
	int P1_GetScore(void) { return P1_Score; };
	int P2_GetScore(void) { return P2_Score; };
};

class HighScorePage : public Scene
{ //High Score Page Scene
public:
	HighScorePage();
	~HighScorePage();

	void draw();
	void update();
	void reset();
	void freeResource();
	void loadResource();
	void handleKeyboard(int key, int x, int y);
	void handleKeyboardUp(int key, int x, int y);
	void handleKeyboardSpecial(int key, int x, int y);
	void getMid(int &x, int &y);
	void handleMouseClick(int button, int state, int x, int y);
	void handleMouseMove(int x, int y);
};
